﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class VideoSliderEvent : MonoBehaviour,IDragHandler {
    [SerializeField]
    private ToPlayVideo toPlayVideo; //在inspect面板上，视频播放脚本

    

    // Use this for initialization
    void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}
    //给Slider添加拖拽事件
    public void OnDrag(PointerEventData eventData)
    {
        toPlayVideo.SetVideoTimeValueChange();
    }
    //当前的Slider比例转换为当前的视频播放时间
    //private void SetVideoTimeValueChange()
    //{
    //    toPlayVideo.videoPlayer.time = toPlayVideo.videoPlayer.clip.length * toPlayVideo.videoTimeSlider.value;
    //}
}
